package cn.zhage.aimin.mcp.server.service;

/*
 *
 * @author 渣哥
 */

import cn.zhage.aimin.mcp.server.mapper.TableInfoMapper;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
@RequiredArgsConstructor
public class TableInfoService {

    private final TableInfoMapper tableInfoMapper;


    public List<Map<String,String>> getTableNames(){
        return tableInfoMapper.tableNames();
    }

    public List<Map<String,String>> getFieldListByTableName(String tableName){
        return tableInfoMapper.getFieldListByTableName(tableName);
    }

    public List<Map<String,Object>> executeSql(String sql){
        return tableInfoMapper.executeSql(sql);
    }
}
